﻿namespace ClassLibrary.BusinessLayer.Facade
{
    using ClassLibrary.BusinessLayer.BusinessObjects;
    using ClassLibrary.DataLayer.DataObjects;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Data.Common;

    [DataObject(true)]
    public class ProcedureSetFacade
    {
        private IProcedureSetDAO headingSetDAO = DAOAccess.ProcedureSetDAO;

        [DataObjectMethod(DataObjectMethodType.Insert)]
        public bool AddProcedureSet(ProcedureSet clsProcedureSet)
        {
            return this.headingSetDAO.InsertProcedureSet(clsProcedureSet);
        }

        [DataObjectMethod(DataObjectMethodType.Insert)]
        public int AddProcedureSetAndReturnIdentity(ProcedureSet clsProcedureSet)
        {
            return this.headingSetDAO.InsertProcedureSetReturnIdentity(clsProcedureSet);
        }

        [DataObjectMethod(DataObjectMethodType.Insert)]
        public string AddProcedureSetAndReturnOutput(ProcedureSet clsProcedureSet)
        {
            return this.headingSetDAO.InsertProcedureSetReturnOutput(clsProcedureSet);
        }

        [DataObjectMethod(DataObjectMethodType.Delete)]
        public bool DeleteProcedureSet(ProcedureSet clsProcedureSet)
        {
            return this.headingSetDAO.DeleteProcedureSet(clsProcedureSet);
        }

        [DataObjectMethod(DataObjectMethodType.Delete)]
        public int DeleteProcedureSet(string SPName, DbParameter[] param)
        {
            return this.headingSetDAO.DeleteProcedureSet(SPName, param);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public IList<ProcedureSet> GetProcedureSet(ProcedureSet clsProcedureSet)
        {
            return this.headingSetDAO.GetProcedureSet(clsProcedureSet);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public IList<ProcedureSet> GetProcedureSet(string headingSet)
        {
            ProcedureSet clsProcedureSet = new ProcedureSet();
            clsProcedureSet._HeadingSet = headingSet;
            return this.headingSetDAO.GetProcedureSet(clsProcedureSet);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public IList<ProcedureSet> GetsProcedureSet()
        {
            return this.headingSetDAO.GetsProcedureSet();
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public DataTable GetsProcedureSet(string SPName, DbParameter[] param)
        {
            return this.headingSetDAO.GetsProcedureSet(SPName, param);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public IList<ProcedureSet> ListProcedureSet(ProcedureSet clsProcedureSet)
        {
            return this.headingSetDAO.ListProcedureSet(clsProcedureSet);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public IList<ProcedureSet> ListProcedureSet(string headingSet)
        {
            ProcedureSet clsProcedureSet = new ProcedureSet();
            clsProcedureSet._HeadingSet = headingSet;
            return this.headingSetDAO.ListProcedureSet(clsProcedureSet);
        }

        [DataObjectMethod(DataObjectMethodType.Update)]
        public bool UpdateProcedureSet(ProcedureSet clsProcedureSet)
        {
            return this.headingSetDAO.UpdateProcedureSet(clsProcedureSet);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public int UpdateProcedureSet(string SPName, DbParameter[] param)
        {
            return this.headingSetDAO.UpdateProcedureSet(SPName, param);
        }
    }
}

